//
//  InputViewCell.m
//  ForestPack
//
//  Created by 骆锴 on 2018/7/18.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "InputViewCell.h"

@interface InputViewCell ()

@property (nonatomic, strong) UILabel *title;
@property (nonatomic, strong) UILabel *line;
@property (nonatomic, strong) UITextField *input;

@end

@implementation InputViewCell

+ (InputViewCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"inputcell";
    InputViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[InputViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.backgroundColor = [UIColor whiteColor];
        [cell createSubView];
    }
    
    return cell;
}

- (void)createSubView {
    _title = [[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(15), ScreenX375(58), ScreenX375(14))];
    _title.font = Kfont(14);
    _title.text = @"数  量:";
    _title.textColor = [UIColor blackColor];
    [self addSubview:_title];
    
    _input = [[UITextField alloc] initWithFrame:CGRectMake(ScreenX375(81), ScreenX375(15), ScreenX375(200), ScreenX375(15))];
    _input.borderStyle = UITextBorderStyleNone;
    _input.textAlignment = NSTextAlignmentLeft;
    _input.placeholder = @"请填写数量(100个起印)";
    _input.font = Kfont(15);
    [self addSubview:_input];
    
    _line = [[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(44), ScreenX375(349), ScreenX375(1))];
    UIColor *color = [UIColor colorWithPatternImage:[UIImage imageNamed:@"虚线"]];
    [_line setBackgroundColor:color];
    [self addSubview:_line];
}

@end
